package com.project.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.SystemInfo.RecordBean;
import com.project.service.IRecordService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDate;

@RestController
@RequestMapping("record")
public class RecordController {


    @Resource
    private IRecordService recordService;


    @RequestMapping("findByDate")
    public IPage<RecordBean> findByDate(@RequestParam(value = "pageNo",defaultValue = "1") int pageNo, @RequestParam(value = "pageSize",defaultValue = "3") int pageSize, LocalDate startDate, LocalDate endDate){

        IPage<RecordBean> page = recordService.findByDate(pageNo,pageSize,startDate,endDate);

        return page;
    }


}
